<?
$sub_menu = "400900";
include_once("./_common.php");

auth_check($auth[$sub_menu], "w");
if(!$_POST[shop_idx] || $_POST[shop_idx]=="")
{
	echo("<script>alert('잘못된 접속입니다.');history.back(-1);</script>");
}
else
{

	$tranc_if = str_replace(",","",$tranc_if);
	$tranc_price = str_replace(",","",$tranc_price);
	$tranc_info = addslashes($tranc_info);
	$point_price = str_replace(",","",$point_price);
	$point_per = str_replace(",","",$point_per);
	$bank_info = trim(str_replace("\n","/",$bank_info));

	$sql = "update g4_shop set ";
	$sql.= "tranc_if = '".$tranc_if."', ";
	$sql.= "tranc_price = '".$tranc_price."', ";
	$sql.= "tranc_info = '".$tranc_info."', ";
	$sql.= "point_use = '".$point_use."', ";
	$sql.= "point_price = '".$point_price."', ";
	$sql.= "point_per = '".$point_per."', ";
	$sql.= "bank_use = '".$bank_use."', ";
	$sql.= "bank_info = '".$bank_info."', ";
	$sql.= "shop_mid = '".$shop_mid."', ";
	$sql.= "shop_mertkey = '".$shop_mertkey."', ";
	$sql.= "shop_mode = '".$shop_mode."', ";
	$sql.= "card_use = '".$card_use."', ";
	$sql.= "iche_use = '".$iche_use."', ";
	$sql.= "hp_use = '".$hp_use."', ";
	$sql.= "ebank_use = '".$ebank_use."' ";
	$sql.= "where idx = '".$_POST[shop_idx]."' limit 1";

	$rst = mysql_query($sql);

	if($rst)
	{
		echo("<script>alert('정상처리 되었습니다.');location.href='./shop.php';</script>");
	}
	else
	{
		echo("<script>alert('처리실패!! 관리자에게 문의하세요.');history.back(-1);</script>");
	}
}
?>